﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Passport_Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>登录</title>
    <link href="Css/LoginSheet.css" rel="stylesheet" type="text/css" />
    <script src="../Skin/CommStyle/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <link href="~/css/in.css" rel="stylesheet" type="text/css" />
    <link href="~/css/g_222.css" rel="stylesheet" type="text/css" />
    <link href="~/css/g_css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="../js/common.js"></script>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script src="../Js/jquery.min.1.7.1.js"></script>
    <script type="text/javascript" language="javascript" src="../js/ljs.js"></script>
    <script type="text/javascript">
        //页面加载时，用户名文本框获取焦点
        function SetFocus() {
            var obj = document.getElementById("H_UserName"); //用户名
            if (obj.value == "") {
                obj.focus();
            }
        }
        $(function () {
            $("#<%=H_UserName.ClientID %>").blur(function () {
                if ($("#<%=H_UserName.ClientID %>").val() == "") {
                    $("#<%=H_UserName.ClientID %>").addClass("form_dashed");
                    $("#lblname").text('请输入用户名');
                } else {
                    $("#<%=H_UserName.ClientID %>").removeClass("form_dashed");
                    $("#lblname").text('');
                }
            });
            $("#<%=H_UserPassword.ClientID %>").blur(function () {
                if ($("#<%=H_UserPassword.ClientID %>").val() == "") {
                    $("#<%=H_UserPassword.ClientID %>").addClass("form_dashed");
                    $("#lblPass").text('请输入密码');
                } else {
                    $("#<%=H_UserPassword.ClientID %>").removeClass("form_dashed");
                    $("#lblPass").text('');
                }
            });
            $("#<%=CheckCode.ClientID %>").blur(function () {
                if ($("#<%=CheckCode.ClientID %>").val() == "") {
                    $("#<%=CheckCode.ClientID%>").addClass("form_dashed");
                    $("#lblcode").text('请输入验证码');
                } else {
                    $("#<%=CheckCode.ClientID%>").removeClass("form_dashed");
                    $("#lblcode").text('');
                }
            });

        });
        function LoginSubmit() {
            if ($("#<%=H_UserName.ClientID %>").val() == "") {
                $("#<%=H_UserName.ClientID %>").addClass("form_dashed");
                $("#lblname").text('请输入用户名');
                return false;
            } else {
                $("#<%=H_UserName.ClientID %>").removeClass("form_dashed");
                $("#lblname").text('');
            }
            if ($("#<%=H_UserPassword.ClientID %>").val() == "") {
                $("#<%=H_UserPassword.ClientID %>").addClass("form_dashed");
                $("#lblPass").text('请输入密码');
                return false;
            } else {
                $("#<%=H_UserPassword.ClientID %>").removeClass("form_dashed");
                $("#lblPass").text('');
            }
            if ($("#<%=CheckCode.ClientID %>").val() == "") {
                $("#<%=CheckCode.ClientID%>").addClass("form_dashed");
                $("#lblcode").text('请输入验证码');
                return false;
            } else {
                $("#<%=CheckCode.ClientID%>").removeClass("form_dashed");
                $("#lblcode").text('');
            }
            return true;
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="head">
        <hl:Top ID="Top1" runat="server" />
        <div id="warp">
            <div class="autohei">
                <div align="center">
                    <img src="../images/zhuce.jpg" width="998" height="34" /></div>
                <div class="blank">
                </div>
                <div class="denglu autodhei">
                    <span class="left">
                        <img src="../images/zhuce_p1.jpg" width="459" height="250" /></span>
                    <div class="denglucont right">
                        <ul class="dl_tit">
                            <li id="login_html" class="hover">个人登陆</li>
                        </ul>
                        <div class="dlbox">
                            <div id="loginbox">
                                <div>
                                    <strong>登录名：</strong></div>
                                <div>
                                    <asp:TextBox ID="H_UserName" runat="server" CssClass="text width180" TabIndex="1" />
                                    <label class="error" id="lblname">
                                    </label>
                                </div>
                                <div>
                                    <strong>登陆密码：</strong></div>
                                <div>
                                    <asp:TextBox ID="H_UserPassword" runat="server" TextMode="password" CssClass="text width180"
                                        TabIndex="2" />
                                    <label class="error" id="lblPass">
                                    </label>
                                </div>
                                <div>
                                    <strong>验证码：</strong></div>
                                <div>
                                    <asp:TextBox ID="CheckCode" runat="server" CssClass="text" MaxLength="10" Width="90"
                                        TabIndex="3" />
                                    <a onclick="javascript:refreshCode();" href="#" id="ImgCheckCode"></a>
                                    <label class="error" id="lblcode">
                                    </label>
                                </div>
                                <div>
                                    <asp:ImageButton ID="LoginButton" runat="server" OnClientClick="return LoginSubmit()"
                                        TabIndex="4" ImageUrl="~/Images/denglu.jpg" />
                                    <asp:HyperLink ID="hlforgetpwd" NavigateUrl="forget_password.aspx" runat="server"
                                        Text="忘记密码" CssClass="clew" />
                                    | <a href="#">我要注册</a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <hl:Foot ID="Foot1" runat="server" />
    </div>
    <asp:HiddenField ID="H_ComeUrl" runat="server" />
    <script type="text/javascript">
        function keydown() {
            if (event.keyCode == 13) {
                WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("LoginSubmit", "", true, "", "", false, true));
            }
        }
        function refreshCode() {
            document.getElementById("ImgCheckCode").innerHTML = "<img src='CheckCode.aspx?rnd=" + Math.random() + "' title='看不清楚，请点击更换验证码' />";
        }
        refreshCode();
    </script>
    </form>
</body>
</html>
